﻿using System;
using System.Collections.Generic;
using System.Text;

namespace SqlCe4Mvc3Application1.Models
{
    public partial class _Navigation_AdminMenuPartRecord : RaisingStudio.Data.Expressions.TableExpression, RaisingStudio.Data.Expressions.IQueryExpression<_Navigation_AdminMenuPartRecord>
    {
        #region Constructor (s) / Destructor
        /// <summary>
        /// Constructor (s) / Destructor.
        /// </summary>
        public _Navigation_AdminMenuPartRecord() : base("Navigation_AdminMenuPartRecord")
        {
        }
        #endregion
        #region Members
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Id = "Id";
        public RaisingStudio.Data.Expressions.ColumnExpression Id { get { return _Id; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _AdminMenuText = "AdminMenuText";
        public RaisingStudio.Data.Expressions.ColumnExpression AdminMenuText { get { return _AdminMenuText; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _AdminMenuPosition = "AdminMenuPosition";
        public RaisingStudio.Data.Expressions.ColumnExpression AdminMenuPosition { get { return _AdminMenuPosition; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _OnAdminMenu = "OnAdminMenu";
        public RaisingStudio.Data.Expressions.ColumnExpression OnAdminMenu { get { return _OnAdminMenu; } }

		#endregion

        public static implicit operator RaisingStudio.Data.Expressions.ConditionExpression(_Navigation_AdminMenuPartRecord Navigation_AdminMenuPartRecord)
        {
            return new RaisingStudio.Data.Expressions.ConditionExpression();
        }

        public RaisingStudio.Data.Expressions.ConditionExpression OrderBy(RaisingStudio.Data.Expressions.ColumnExpression columnExpression)
        {
             RaisingStudio.Data.Expressions.ConditionExpression conditionExpression = this;
             return conditionExpression.OrderBy(columnExpression);
        }

        public RaisingStudio.Data.Expressions.ConditionExpression OrderBy(RaisingStudio.Data.Expressions.ColumnExpression columnExpression, RaisingStudio.Data.Expressions.SortingDirection sortingDirection)
        {
            RaisingStudio.Data.Expressions.ConditionExpression conditionExpression = this;
            return conditionExpression.OrderBy(columnExpression, sortingDirection);
        }

        public RaisingStudio.Data.Expressions.ConditionExpression Where(RaisingStudio.Data.Expressions.ExpressionElement expressionElement)
        {
            RaisingStudio.Data.Expressions.ConditionExpression conditionExpression = this;
            return conditionExpression.Where(expressionElement);
        }

        public static implicit operator RaisingStudio.Data.Expressions.ColumnExpressionCollection(_Navigation_AdminMenuPartRecord Navigation_AdminMenuPartRecord)
        {
            return new RaisingStudio.Data.Expressions.ColumnExpressionCollection(Navigation_AdminMenuPartRecord);
        }

        public static implicit operator RaisingStudio.Data.Expressions.ColumnExpression[](_Navigation_AdminMenuPartRecord Navigation_AdminMenuPartRecord)
        {
            return new RaisingStudio.Data.Expressions.ColumnExpression[]
                        {                            
                            Navigation_AdminMenuPartRecord.Id,
                            Navigation_AdminMenuPartRecord.AdminMenuText,
                            Navigation_AdminMenuPartRecord.AdminMenuPosition,
                            Navigation_AdminMenuPartRecord.OnAdminMenu,
                        };
        }

        public RaisingStudio.Data.Expressions.ColumnExpressionCollection Except(params RaisingStudio.Data.Expressions.ColumnExpression[] columns)
        {
            RaisingStudio.Data.Expressions.ColumnExpressionCollection columnExpressionCollection = this;
            return columnExpressionCollection.Except(columns);
        }

    
        public static implicit operator RaisingStudio.Data.Expressions.QueryExpression<_Navigation_AdminMenuPartRecord>(_Navigation_AdminMenuPartRecord Navigation_AdminMenuPartRecord)
        {
            return new RaisingStudio.Data.Expressions.QueryExpression<_Navigation_AdminMenuPartRecord>(Navigation_AdminMenuPartRecord);
        }


        #region IQueryExpression<_Navigation_AdminMenuPartRecord> 成员

        _Navigation_AdminMenuPartRecord RaisingStudio.Data.Expressions.IQueryExpression<_Navigation_AdminMenuPartRecord>.Value
        {
            get { return Navigation_AdminMenuPartRecord._; }
        }

        #endregion

        #region IQueryExpression 成员

        RaisingStudio.Data.Expressions.TableExpression RaisingStudio.Data.Expressions.IQueryExpression.Table
        {
            get { return this; }
        }

        RaisingStudio.Data.Expressions.ConditionExpression RaisingStudio.Data.Expressions.IQueryExpression.Condition
        {
            get { return this; }
        }

        RaisingStudio.Data.Expressions.ColumnExpressionCollection RaisingStudio.Data.Expressions.IQueryExpression.Columns
        {
            get { return null; }
        }

        #endregion
    }

    partial class Navigation_AdminMenuPartRecord
    {
        #region Members
        public static readonly _Navigation_AdminMenuPartRecord _ = new _Navigation_AdminMenuPartRecord();
		#endregion
    }
}
